#pragma once
#include<iostream>
#include<string>

class Shape_Interface
{
public:
	virtual void Draw() = 0;
};

class Circle_Implementation :public Shape_Interface
{
public:
	void Draw() override
	{
		std::cout << "Inside Circle draw() method" << std::endl;
	}
};

class Rectangle_Implementation :public Shape_Interface
{
public:
	void Draw() override
	{
		std::cout << "Inside Rectangle draw() method" << std::endl;
	}
};

class Square_Implementation :public Shape_Interface
{
public:
	void Draw() override
	{
		std::cout << "Inside Square draw() method" << std::endl;
	}
};

class ShapeFactory
{
public:
	Shape_Interface* GetShape(std::string ShapeType)
	{
		if (ShapeType == "Circle")
		{
			Shape_Interface* Instance = new Circle_Implementation();
			return Instance;
		}
		else if (ShapeType == "Rectangle")
		{
			Shape_Interface* Instance = new Rectangle_Implementation();
			return Instance;
		}
		else if (ShapeType == "Square")
		{
			Shape_Interface* Instance = new Square_Implementation();
			return Instance;
		}
		return nullptr;
	}

};